package com.cashmama.market.api.infras.enums.error;

import com.fqgj.exception.enums.ErrorCodeEnum;
import org.springframework.http.HttpStatus;

/**
 * Created by linchengyu on 17/3/6.
 */
public enum UserProfileErrorCodeEnum implements ErrorCodeEnum {

    USER_PROFILE_ENUM_TYPE_NOT_EXIST(61001, "user profile enum does not exists", HttpStatus.OK),
    USER_PROFILE_ID_DATA_TYPE_NOT_EXIST(61002, "Check type parameter is incorrect", HttpStatus.OK),     // 校验类型参数有误
    USER_PROFILE_BIND_CARD_INFO_NOT_COMPLETE(61003, "Card information is incomplete", HttpStatus.OK),   // 卡信息不完整
    USER_PROFILE_BIND_CARD_ERROR_MESSAGE(61004, "Bind card error", HttpStatus.OK),                      // 绑卡异常
    USER_PROFILE_BIND_CARD_NUMBER_NOT_MATCH(61005, "The bank does not match the bank card number, please re-fill", HttpStatus.OK),// 开户行与银行卡号不匹配，请重新填写
    USER_PROFILE_BIND_CARD_BINDED(61006, "Successful bind card", HttpStatus.OK),                        // 签约成功
    USER_PROFILE_BANK_CODE_NOT_EXIST(61007, "Bank code does not exist", HttpStatus.OK),                 // 银行代码不存在
    USER_PROFILE_BIND_CARD_FAIL(61008, "Bind card failed", HttpStatus.OK),                              // 签约失败
    USER_PROFILE_BIND_CARD_NOT_EXIST(61009, "Unbound bank card", HttpStatus.OK),                        // 未绑定银行卡
    USER_PROFILE_REAL_NAME_NOT_EXIST(61010, "Unable to get user information", HttpStatus.OK),           // 无法获取用户信息
    USER_PROFILE_51_BIND_RESPONSE_ERROR(61011, "The card binding service is abnormal", HttpStatus.OK),  // 绑卡服务异常
    USER_PROFILE_FACE_NEED_WAIT(61012, "Face recognition times exceeded", HttpStatus.OK),               // 人脸识别次数超限
    USER_PROFILE_SM_DATA_ERROR(61013, "Shumei data anomaly", HttpStatus.OK),                            // 数美数据异常
    USER_PROFILE_NOT_ALLOW_MODIFY_PROFILE(61014, "In the order processing, please improve the information later", HttpStatus.OK),//订单处理中，请稍后完善信息
    USER_PROFILE_BIND_TYPE_NOT_EXIST(61015, "Bank card binding type does not exist", HttpStatus.OK),    // 银行卡绑定类型不存在
    USER_PROFILE_BIND_LL_ERROR(61016, "Authentication failed, please try again later", HttpStatus.OK),  // 认证失败，请稍后再试
    USER_PROFILE_IDENTITY_NO_IS_EXIST(61017, "The ID number is already occupied", HttpStatus.OK),       // 该身份证号已被占用
    USER_PROFILE_IDENTITY_NO_ILLEGAL(61018, "The ID number is illegal", HttpStatus.OK),                 // 该身份证号不合法
    USER_PROFILE_NO_EXIST(61019, "User does not exist", HttpStatus.OK),                                 // 用户不存在
    USER_FROZEN(61020, "The user is frozen, can't borrow, and borrows in %s days later", HttpStatus.OK),// 用户被冻结，不能借款，%s天后再来借款
    USER_BANK_NOT_EXIST(61021, "Unlinked bank card", HttpStatus.OK),                                    // 未绑银行卡
    USER_EMALI_NOT_EXIST(61029, "Unlinked email ", HttpStatus.OK),                                    // 未绑邮箱
    USER_PARAM_EXCEPTION(61022, "Profile list parameter is abnormal", HttpStatus.OK),                   // 个人资料列表参数异常
    USER_PROFILE_BIND_CARD_NOTADPTE(61023, "分期产品暂不支持招商银行卡放款，请更换银行卡哦", HttpStatus.OK),
    USER_PROFILE_NEED_CRIDET_ZHIMA(61024, "请先进行芝麻实名认证哦～", HttpStatus.OK),
    USER_PROFILE_REALNAME_NOT_EMPTY(61025, "Do not leave blank for real name", HttpStatus.OK),          // 真实姓名不能为空
    USER_PROFILE_IDCARD_NOT_EMPTY(61026, "ID number cannot be empty", HttpStatus.OK),                   // 身份证号不能为空
    USER_PROFILE_REALNAME_NOT_ILLIGAL(61027, "Invalid name", HttpStatus.OK),                            // 姓名不合法
    USER_PROFILE_VERSION_NOT_CORRECT(61028, "The version is too low, please go to the application market to download the latest version of app~", HttpStatus.OK),// 版本过低，请到应用市场下载最新版app～
    USER_PROFILE_ZHIMA_CREDIT_NOT_NEED(61029, "芝麻免认证，请移步到绑卡实名认证～", HttpStatus.OK),
    USER_PROFILE_PIN_CODE(61035, "Invalid pin code", HttpStatus.OK),
    USER_SOCIAL_LOGIN_FAILURE(61030, "login failure", HttpStatus.OK),
    USER_VID_CRAWLER_TASK_SUBMITTING(61031, "Please wait for", HttpStatus.OK),
    USER_VID_CRAWLER_TASK_ERROR(61032, "Please try again", HttpStatus.OK),
    USER_VID_CRAWLER_INPUT_OPT(61033, "UID submit successfully，Please enter OTP", HttpStatus.OK),
    USER_VID_CRAWLER_OPT_ERROR(61034, "Enter OTP error，Please enter OTP", HttpStatus.OK),
    USER_CONTACT_INFO_NOT_COMPLETE(61050, "Congratulations! You are one step away from a successful loan application \n For your loan data security,please go to the assistant backup data", HttpStatus.OK),   // 通话记录 or 短信 信息不完整
    USER_LEVEL_ERROR(61051, "reward not configured", HttpStatus.OK),
    USER_LEVEL_DATA_EMPTY(61052, "user level info data is empty", HttpStatus.OK),
    USER_LEVEL_DATA_REPEAT(61053, "You have successfully signed in today. Please do not sign in again.", HttpStatus.OK),



    ;


    private Integer code;

    private String desc;

    private HttpStatus httpStatus;

    UserProfileErrorCodeEnum(Integer code, String desc, HttpStatus httpStatus) {
        this.code = code;
        this.desc = desc;
        this.httpStatus = httpStatus;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    public UserProfileErrorCodeEnum setCode(Integer code) {
        this.code = code;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    /****
     * 错误信息
     * @return
     */
    @Override
    public String getMsg() {
        return desc;
    }

    public UserProfileErrorCodeEnum setDesc(String desc) {
        this.desc = desc;
        return this;
    }

    @Override
    public HttpStatus getHttpStatus() {
        return httpStatus;
    }

    public UserProfileErrorCodeEnum setHttpStatus(HttpStatus httpStatus) {
        this.httpStatus = httpStatus;
        return this;
    }
}
